<script setup lang="ts">
const props = defineProps({
  iconName: {
    type: String,
    default: ''
  },
  size: {
    type: [Number, String],
    default: '20'
  }
})
</script>

<template>
  <i class="el-icon" :style="{'font-size': size+'px', width: size+'px', height: size+'px'}">
    <svg class="svg-icon" aria-hidden="true">
      <use :xlink:href="'#icon-'+iconName" />
    </svg>
  </i>

</template>

<style scoped lang="scss">
.el-icon{
  display: inline-flex;
  fill: currentColor;
  svg {
    width: 100%;
    height: 100%;
  }
}
</style>